<%@ page language="java" import="java.util.*,cn.ainit.sys.utils.DateTimeStr" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>爱你特综合决策分析软件</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/themes/icon.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/pages/css/default.css" type="text/css"></link>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.1.2.2.js"></script>
    <script type="text/javascript" src='${pageContext.request.contextPath}/js/jquery.ainit-1.0.0.js'> </script>
    <script type="text/javascript" src='${pageContext.request.contextPath}/js/outlook2.js'> </script>
    <style type="text/css">
	    .loginI{
			width: 968px;
			height:407px;
			text-align:center;
			background-image: url("pages/images/LOGIN.png") ;
		}
		.lname{
			position: absolute;
			margin-left: 160px;
			font-family: "微软雅黑";
			font-size: 13px;
		}
		.rname{
			position: absolute;
			width:100%;
			text-align:center;
			margin-top: 428px;
			font-family: "微软雅黑";
			font-size: 13px;
			color: #ACC0FC;
		}
		.loginInput{
			width: 120px;
			height: 14px;
			border:1px solid #1AA5CC;
			background-color:#BDEBF7;
		}
		.loginBut{
			position: absolute;
			width: 74px;
			height: 74px;
			margin-left: 334px;
			margin-top: 207px;
			cursor: pointer;
		}
    </style>
    <script type="text/javascript">
    	function login(){
    		//window.location = "${pageContext.request.contextPath}/menu/getAllMenu";
    		//return;
    		var name = $('#loginName').val();
    		var pass = $('#loginPass').val();
    		$.ajax({
    			type:'post',
    			url:'${pageContext.request.contextPath}/menu/login',
    			data:{'name':name,'pass':pass},
    			success:function(data){
    				if(data == "success"){
		    			window.location = "${pageContext.request.contextPath}/menu/getAllMenu";
    				}else{
    					$('#info').val("用户名或者密码错误！请重新登陆");
    					var a = $('#loginPass').val();
    					$('#info').fadeIn("slow");
    				}
    			}
    		});
    	}
    	
    	function BindEnter(obj){
    	  	var button = document.getElementById("loginBut");
    		    if(obj.keyCode == 13){
                  	button.click();
                  	obj.returnValue = false;
                }
    	}
    	$(function(){
    		if(getOs() == "MSIE"){
    			$("span[class=lname]").css("marginLeft",640);
    			$("span[class=loginBut]").css("marginLeft",818);
    		}
    		if(getOs() == "Safari"){
    			$("span[class=lname]").css("marginLeft",210);
    			$("span[class=loginBut]").css("marginLeft",344);
    		}
    	});
    	
    </script>
    </head>
<body onkeydown="BindEnter(event)" style="background-color:#007BE5; margin: 0px; padding: 0px;" >
	<div style="text-align:center; min-width:954px; width:100%; height: 160px; background-color:#004BDB;" ></div>
	<span class="rname">2013-2014 © 上海爱你特科技发展有限公司</span>
	<div style="width: 100%; height: 200px; background-color:#004BDB;" align="center">
		<div class='loginI'>
			<span class="lname" style="margin-top: 228px;">账号:<span style="margin-left: 10px;"></span><input id='loginName' class="loginInput"/></span>
			<span class="lname" style="margin-top: 255px;">密码:<span style="margin-left: 10px;"></span><input id='loginPass' class="loginInput" type="password"/></span>
			<span class="loginBut" id="loginBut" onclick="login();"></span>
			<div><input id='info' size="60"  style="color:#ff3333;margin-top:270px;margin-left: 510px;border: none;background-color:transparent;text-align: center; " /></div>
		</div>
	</div>
</body>
</html>